home *** CD-ROM | disk | FTP | other *** search
/ Revista CD Expert 8 / Revista CD Expert nº 08 CD1.iso / Utilitarios / Programacao / Pacific C for DOS / EXAMPLES / ARGS.C next >
C/C++ Source or Header  |  1995-03-08  |  481b  |  21 lines

  1. #include    <stdio.h>
  2.  
  3. /*
  4.  *    This program demonsrates use of "argc" and
  5.  *    "argv" to iterate through the command line
  6.  *    argument list.
  7.  *
  8.  *    To explore the effect of the PACC "-R" option
  9.  *    and the PPD "_getargs() wildcard expansion"
  10.  *    option first compile this program without "-R"
  11.  *    or "wildcard expansion" and run ARGS *.C
  12.  *    then compile it with wildcard expansion
  13.  *    and run it again.
  14.  */
  15.  
  16. main(int argc, char ** argv)
  17. {
  18.     while (--argc)
  19.         puts(*++argv);
  20. }
  21.